<template>
  <div>
    <tabbar id="stab">
      <Tabbar-item @on-item-click="ck" v-for="value in arr" :key='value.id' :link="value.path">
          <img slot="icon" :src="s">
          <span slot="label">{{value.user}}</span>
      </Tabbar-item>

    </tabbar>
  </div>
</template>
<script>
  import {Tabbar, TabbarItem} from 'vux'
  export default{
    components: {
      Tabbar,
      TabbarItem

    },
    methods: {
      ck(){
        console.log('点击了地步');
      }
    },
    data(){
      return {
        arr: [{'user':"首页",'path':'/index'},{'user':'综合商品','path':'/goods'},{'user':'购物车','path':'/shopping'},{'user':'个人中心','path':'/login'}],
        s: './static/assets/logo.png'
      }
    }
  }
</script>
<style>
  #stab .weui-tabbar__item.weui-bar__item_on .weui-tabbar__label {
    color: blueviolet;
  }
  #stab {
    height: 44px;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 100;

  }
  #stab .weui-tabbar__item .weui-tabbar__icon{
    height: 20px;
  }
</style>
